package com.bdqn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.crm.pojo.SysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface SysUserMapper extends BaseMapper<SysUser> {

    SysUser getlogin(@Param("usrName") String usrName, @Param("usrPassword") String usrPassword);

//    Page<SysUser> findUsers(String usrName, Long roleId, Pageable pageable);

//    SysUser getUsrName(@Param("sysUser") SysUser sysUser);

    /**
     * 分页查找系统用户
     *
     * @param sysUser
     * @param pageIndex
     * @param pageSize
     * @return
     */
    List<SysUser> getPageList(@Param("sysUser") SysUser sysUser,
                              @Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    /**
     * 根据条件获得总记录数
     *
     * @param sysUser
     * @return
     */
    int getPageListTotal(@Param("sysUser") SysUser sysUser);
}
